<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
  <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  <head>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.1.0.js"></script>
<script type="text/javascript">
   $(document).ready(function(){
      //alert("ready");
      $("#purchasedListTable tr").mouseover(function(){
         $(this).css("background","yellow");
         $(this).click(function(){
            //alert($(this).children().eq(0).text());
            var itemNo = $(this).children().eq(0).text();
            location.href="${initParam.root}item/showItemContent.moja?itemNo="+itemNo+"&memberId=${sessionScope.mvo.memberId}";
         });
      });
      $("#purchasedListTable tr").mouseleave(function(){
         $(this).css("background","white");
      });
      
      $("#downBtn").click(function(){
    	  alert($(this).parent().parent().parent().children().eq(0).text());
    	  //alert($(this).parent().parent().children().eq(0).text());
    	  if(confirm("다운로드 하시겠습니까? ")){
    		  //location.href="fileDownload.moja?itemNo="+ itemNo;
    	  }
      })
   });
</script>
  </head>


내가구매한상품들~~~~

<div id="mainCss">
	<table border="5" cellpadding="0" cellspacing="0" id="purchasedListTable">
<thead>
	<tr>
		<th colspan="6"><h2>구매 목록</h2></th>
	</tr>
	<th>상품번호</th><th>상품명</th><th>상세정보</th><th>작성자</th><th>가격</th><th>파일다운로드</th>
</thead>
<tbody>
<c:forEach items="${requestScope.ivoList }" var="itemVO">
<tr>
	<td>${itemVO.itemNo}</td>
	<td>${itemVO.itemName}</td>
	<td>${itemVO.itemInfo}</td>
	<td>${itemVO.memberId}</td>
	<td>${itemVO.itemPrice}</td> 
	<td><a href=""><input type="button" id="downBtn" value="다운로드"></a></td>
<%--     <td><a href="fileDownloadPoint.moja?itemPrice=${itemVO.itemPrice }&memberId=${sessionScope.mvo.memberId}&memberPoint=${sessionScope.mvo.memberPoint}&selId=${itemVO.memberId}&fileDir=${itemVO.fileDir }&sellerId=${itemVO.memberId}"><input type="button" value="다운로드"></a></td>
 --%>
<!--  <td><a href="fileDownload.moja?filename="+sellerId+"\\"+fileDir"></a> </td> -->
 
 </tr>
</c:forEach>
</tbody>

</table>
</div>


   


